<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'equipment-form',
	'enableAjaxValidation'=>false,
        'htmlOptions'=>array(
            'enctype'=>'multipart/form-data',
        )
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
        <?php if(isset($model->image)):?>
            <img src="<?=getImageBySize($model->image,250,250);?>"/>
        <?php endif?>
        <div class="row">
		<?php echo $form->labelEx($model,'image'); ?>
                <?php echo $form->fileField($model,'file');?>
                <div class="model-data">
                    <?php echo $model->image; ?>
                </div>
		
		<?php echo $form->error($model,'file'); ?>
	</div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'empno'); ?>
                <?php echo $form->hiddenField($model,'empno');?>
                <div class="model-data">
                    <?php echo $model->empno; ?>
                </div>
		
		<?php echo $form->error($model,'empno'); ?>
	</div>

	

	<div class="row">
		<?php echo $form->labelEx($model,'mfg'); ?>
		<?php echo $form->textField($model,'mfg',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'mfg'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'model'); ?>
		<?php echo $form->textField($model,'model',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'model'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'serial'); ?>
		<?php echo $form->textField($model,'serial',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'serial'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'install'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'install',
                    'value'=>CTimestamp::formatDate('m-d-Y',$model->install),
                    'options' => array('dateFormat'=>'m-d-yy'),
                )); ?>
		<?php echo $form->error($model,'install'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'removed'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'removed',
                    'value'=>CTimestamp::formatDate('m-d-Y',$model->install),
                    'options' => array('dateFormat'=>'m-d-yy'),
                )); ?>
		<?php echo $form->error($model,'removed'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'warranty'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'warranty',
                    'value'=>CTimestamp::formatDate('m-d-Y',$model->install),
                    'options' => array('dateFormat'=>'m-d-yy'),
                )); ?>
		<?php echo $form->error($model,'warranty'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'seragrno'); ?>
		<?php echo $form->textField($model,'seragrno',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'seragrno'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'equiploc'); ?>
		<?php echo $form->textField($model,'equiploc',array('size'=>60,'maxlength'=>150)); ?>
		<?php echo $form->error($model,'equiploc'); ?>
	</div>

	

	<div class="row">
		<?php echo $form->labelEx($model,'invoice'); ?>
		<?php echo $form->textField($model,'invoice',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'invoice'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'eqtype'); ?>
		<?php echo $form->textField($model,'eqtype',array('size'=>25,'maxlength'=>25)); ?>
		<?php echo $form->error($model,'eqtype'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'plan'); ?>
		<?php echo $form->dropDownList($model,'plan',$model->planTypeList); ?>
		<?php echo $form->error($model,'plan'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->dropDownList($model,'status',$model->statusList); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>



	<div class="row">
		<?php echo $form->labelEx($model,'pmrequired'); ?>
		<?php echo $form->dropDownList($model,'pmrequired',$model->pmrequiredList); ?>
		<?php echo $form->error($model,'pmrequired'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'notes'); ?>
		<?php echo $form->textArea($model,'notes',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'notes'); ?>
	</div>
        
	<div class="row_buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->